import { Define, EntityObjectFactory } from 'tiny-entity2';
const EntityObjectType = EntityObjectFactory.GetEntityObjectType(process.env.dataBaseType || 'mysql');

@Define.Table({ TableName: "powerconfig" })
export class PowerConfig extends EntityObjectType<PowerConfig>{
    @Define.PrimaryKey()
    id: string;

    @Define.Column({ DataType: Define.DataType.VARCHAR, IsIndex: true })
    objectId: string;

    @Define.Column({ DataType: Define.DataType.VARCHAR })
    objectType: string;

    @Define.Column({ DataType: Define.DataType.VARCHAR })
    functionId: string;

    @Define.Column({
        DataType: Define.DataType.VARCHAR,
        NotAllowNULL: true,
        IsIndex: true
    })
    storeId: string;

    @Define.Column({ DataType: Define.DataType.VARCHAR })
    authMode: string;

    @Define.Column({ DataType: Define.DataType.VARCHAR })
    targetPlatform: string;

    @Define.Column({
        DataType: Define.DataType.BIGINT
    })
    createTime: number;

    @Define.Column({
        DataType: Define.DataType.BIGINT
    })
    version: number;
}